package com.toKnow.model.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Article {
    private Integer id;
    private String title;
    private Integer authorId;
    private String authorName;
    private String avatar;
    private Date publishDate;
    private Boolean isOrigin;
    private String content;
    private String attachment;
    private Integer readNumber;
    private Integer likeNumber;
    private Integer collectNumber;
    private Integer commentNumber;
    private String cover;// 封面图片
    private String digest;

    private List<Type> typeList=new ArrayList<>();
    private List<Tag> tagList=new ArrayList<>();

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getAuthorName() {
        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getDigest() {
        return digest;
    }

    public void setDigest(String digest) {
        this.digest = digest;
    }

    @Override
    public String toString() {
        return "Article{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", authorId=" + authorId +
                ", authorName='" + authorName + '\'' +
                ", publishDate=" + publishDate +
                ", isOrigin=" + isOrigin +
                ", content='" + content + '\'' +
                ", attachment='" + attachment + '\'' +
                ", readNumber=" + readNumber +
                ", likeNumber=" + likeNumber +
                ", collectNumber=" + collectNumber +
                ", commentNumber=" + commentNumber +
                ", cover='" + cover + '\'' +
                ", digest='" + digest + '\'' +
                ", typeList=" + typeList +
                ", tagList=" + tagList +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getAuthorId() {
        return authorId;
    }

    public void setAuthorId(Integer authorId) {
        this.authorId = authorId;
    }

    public Date getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(Date publishDate) {
        this.publishDate = publishDate;
    }

    public Boolean getOrigin() {
        return isOrigin;
    }

    public void setOrigin(Boolean origin) {
        isOrigin = origin;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAttachment() {
        return attachment;
    }

    public void setAttachment(String attachment) {
        this.attachment = attachment;
    }

    public Integer getReadNumber() {
        return readNumber;
    }

    public void setReadNumber(Integer readNumber) {
        this.readNumber = readNumber;
    }

    public Integer getLikeNumber() {
        return likeNumber;
    }

    public void setLikeNumber(Integer likeNumber) {
        this.likeNumber = likeNumber;
    }

    public Integer getCollectNumber() {
        return collectNumber;
    }

    public void setCollectNumber(Integer collectNumber) {
        this.collectNumber = collectNumber;
    }

    public Integer getCommentNumber() {
        return commentNumber;
    }

    public void setCommentNumber(Integer commentNumber) {
        this.commentNumber = commentNumber;
    }

    public List<Type> getTypeList() {
        return typeList;
    }

    public void setTypeList(List<Type> typeList) {
        this.typeList = typeList;
    }

    public List<Tag> getTagList() {
        return tagList;
    }

    public void setTagList(List<Tag> tagList) {
        this.tagList = tagList;
    }

    public Article(Integer id, String title, Integer authorId, Date publishDate, Boolean isOrigin, String content, String attachment, Integer readNumber, Integer likeNumber, Integer collectNumber, Integer commentNumber, List<Type> typeList, List<Tag> tagList) {
        this.id = id;
        this.title = title;
        this.authorId = authorId;
        this.publishDate = publishDate;
        this.isOrigin = isOrigin;
        this.content = content;
        this.attachment = attachment;
        this.readNumber = readNumber;
        this.likeNumber = likeNumber;
        this.collectNumber = collectNumber;
        this.commentNumber = commentNumber;
        this.typeList = typeList;
        this.tagList = tagList;
    }

    public Article() {
    }
}
